﻿using System;
using System.Collections.Generic;
using SlamCms.Web;

namespace SlamCms.Areas._admin.Models
{
	internal class BarIndexViewModel
	{
		public bool ShowLogo { get; set; }
		public string UserName { get; set; }
		public string AdminUrl { get; set; }
		public bool PreviewMode { get; set; }
		public ContentItemInfo ContentItem { get; set; }

		public bool HasContentItem()
		{
			return ContentItem != null;
		}
	}

	internal class ContentItemInfo
	{
		public ContentItemInfo()
		{
			MenuItems = new Dictionary<string, AdministrationBarMenuItem>();
		}

		public string ContentItemId { get; set; }
		public bool IsDraft { get; set; }
		public bool CanEdit { get; set; }
		public string EditUrl { get; set; }
		public bool CanPublish { get; set; }
		public string PublishUrl { get; set; }
		public bool ShowExpirationBox { get; set; }
		public bool CanVerify { get; set; }
		public bool CanRetire { get; set; }
		public string ExpirationMessage { get; set; }
		public DateTime ExpirationDate { get; set; }
		public bool Expired { get; set; }
		public IDictionary<string, AdministrationBarMenuItem> MenuItems { get; set; }
	}
}
